package com.lannuokeji.biz.ac.service.impl;

import com.lannuokeji.biz.ac.entity.User;
import com.lannuokeji.biz.ac.mapper.UserMapper;
import com.lannuokeji.biz.ac.service.UserService;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author lannuoTeck
 * @since 2018-03-17
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

	@Override
	public User login(String id, String password) {
		return baseMapper.login(id,password);
	}

	@Override
	public boolean updatePassword(String id, String password, String repassword) {
		// TODO Auto-generated method stub
		return baseMapper.updatePassword(id,password,repassword);
	}

	@Override
	public User getUserInfo(String id) {
		// TODO Auto-generated method stub
		return baseMapper.getUserInfo(id);
	}

	@Override
	public boolean updateUserInfo(String id, String email, String phone) {
		// TODO Auto-generated method stub
		return baseMapper.updateUserInfo(id,email,phone);
	}

	@Override
	public Integer save(User user) {
		// TODO Auto-generated method stub
		return baseMapper.insertAllColumn(user);
	}

	@Override
	public Page page(Page page, User user) {
		// TODO Auto-generated method stub
		page.setRecords(baseMapper.page(page, user));
       return page;
	}

	@Override
	public boolean del(String id) {
		// TODO Auto-generated method stub
		return baseMapper.del(id);
	}

	@Override
	public boolean check(String id, Integer status, String back) {
		// TODO Auto-generated method stub
		return baseMapper.check(id,status,back);
	}

	@Override
	public boolean invalidLogin(String id, Integer status) {
		// TODO Auto-generated method stub
		return baseMapper.invalidLogin(id,status);
	}

	@Override
	public boolean blackList(String id, Integer blackList) {
		// TODO Auto-generated method stub
		return baseMapper.blackList(id,blackList);
	}

	@Override
	public boolean updateUserAction(String id, Integer roleId) {
		// TODO Auto-generated method stub
		return baseMapper.updateUserAction(id,roleId);
	}

}
